import java.util.Comparator;

/**
 * @author 赵希奥
 * @date 2022/4/20 20:39
 * @gitHub https://github.com/CKXGZXA
 * @gitee https://gitee.com/ckxgzxa
 * @description:
 */
public class MyComparator implements Comparator {
    @Override
    public int compare(Object o1, Object o2) {
        Student s1 = (Student) o1;
        Student s2 = (Student) o2;
        if (s1.getsAge() < s2.getsAge()) {
            return 1;
        } else {
            return 0;
        }
    }
}
